<style>
<!--
.introduce {
	padding:10px;
	border:1px solid;
	color:#5c5c5c;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
}
form#domain-form div {
	padding:10px;
}
-->
</style>
<?php if($model->domain):?>
<div style="text-align:center;">
<div>您已成功抢注了属于您的个性域名.</div>
	<?php 
	$url = Yii::app()->request->hostInfo.$this->createurl('/page/card/',array('domain'=>$model->domain));
	
	echo CHtml::link($url,$url,array('target'=>'_blank'))?>
</div>
<?php else:?>
<div class="form">
<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'domain-form',
	'enableAjaxValidation'=>true,
)); ?>
	<div class='introduce'>
		<span>拥有个性域名，MR8.me/xxx 独一无二.</span>
		<ul>
		<li>请输入4至20位的英文或数字</li>
		<li>为了保障您的信息完整，保存之后将不可修改</li>
		</ul> 
	</div>
	<div class="row">
		<?php echo $form->labelEx($model,'domain'); ?>
		<span>http://mr8.me/</span><?php echo $form->textField($model,'domain',array('class'=>'input','onKeyup'=>"value=value.replace(/^[^A-Za-z]+/g,'');value=value.replace(/[^A-Za-z0-9]/g,'')")); ?>
		<?php echo $form->error($model,'domain'); ?>
	</div>
 

	<div class="row buttons">
		<?php echo CHtml::submitButton('确定',array('class'=>'button')); ?>
	</div>

<?php $this->endWidget(); ?>
</div><!-- form -->
<?php endif;?>